152 research outputs found

    Mailbox Abstractions for Static Analysis of Actor Programs

    Get PDF
    Properties such as the absence of errors or bounds on mailbox sizes are hard to deduce statically for actor-based programs. This is because actor-based programs exhibit several sources of unboundedness, in addition to the non-determinism that is inherent to the concurrent execution of actors. We developed a static technique based on abstract interpretation to soundly reason in a finite amount of time about the possible executions of an actor-based program. We use our technique to statically verify the absence of errors in actor-based programs, and to compute upper bounds on the actors\u27 mailboxes. Sound abstraction of these mailboxes is crucial to the precision of any such technique. We provide several mailbox abstractions and categorize them according to the extent to which they preserve message ordering and multiplicity of messages in a mailbox. We formally prove the soundness of each mailbox abstraction, and empirically evaluate their precision and performance trade-offs on a corpus of benchmark programs. The results show that our technique can statically verify the absence of errors for more benchmark programs than the state-of-the-art analysis

    Static Typing of Complex Presence Constraints in Interfaces

    Get PDF
    Many functions in libraries and APIs have the notion of optional parameters, which can be mapped onto optional properties of an object representing those parameters. The fact that properties are optional opens up the possibility for APIs and libraries to design a complex "dependency logic" between properties: for example, some properties may be mutually exclusive, some properties may depend on others, etc. Existing type systems are not strong enough to express such dependency logic, which can lead to the creation of invalid objects and accidental usage of absent properties. In this paper we propose TypeScriptIPC: a variant of TypeScript with a novel type system that enables programmers to express complex presence constraints on properties. We prove that it is sound with respect to enforcing complex dependency logic defined by the programmer when an object is created, modified or accessed

    Static Typing of Complex Presence Constraints in Interfaces (Artifact)

    Get PDF
    This artifact is based on TypeScriptIPC, a statically typed programming language with interfaces in which complex presence constraints can be defined. This enables developers to express inter-property constraints on interface properties. The need for these inter-property constraints stems from web APIs, which often impose a complex "dependency logic" between properties. For example, some properties may be mutually exclusive, or the presence of a property may depend on the presence of others, etc. TypeScriptIPC is a variant of TypeScript, in which interfaces are extended to express constraints over multiple properties, using propositional logic. This artifact contains documentation on how to build and run TypeScriptIPC, such that the code snippets from the paper can be run

    Mailbox Abstractions for Static Analysis of Actor Programs (Artifact)

    Get PDF
    This artifact is based on Scala-AM, a static analysis framework relying on the Abstracting Abstract Machines approach. This version of the framework is extended to support actor-based programs, written in a variant of Scheme. The sound static analysis is performed in order to verify the absence of errors in actor-based program, and to compute upper bounds on actor\u27s mailboxes. We developed several mailbox abstractions with which the static analysis can be run, and evaluate the precision of the technique with these mailbox abstractions. This artifact contains documentation on how to use analysis and on how to reproduce the results presented in the companion paper

    Transactional Tasks: Parallelism in Software Transactions

    Get PDF
    Many programming languages, such as Clojure, Scala, and Haskell, support different concurrency models. In practice these models are often combined, however the semantics of the combinations are not always well-defined. In this paper, we study the combination of futures and Software Transactional Memory. Currently, futures created within a transaction cannot access the transactional state safely, violating the serializability of the transactions and leading to undesired behavior. We define transactional tasks: a construct that allows futures to be created in transactions. Transactional tasks allow the parallelism in a transaction to be exploited, while providing safe access to the state of their encapsulating transaction. We show that transactional tasks have several useful properties: they are coordinated, they maintain serializability, and they do not introduce non-determinism. As such, transactional tasks combine futures and Software Transactional Memory, allowing the potential parallelism of a program to be fully exploited, while preserving the properties of the separate models where possible

    TOTAM: Scoped Tuples for the Ambient

    Get PDF
    Coordination of mobile applications posses a number of issues. Devices should be able to communicate with each other without being connected with each other at the same time while maintaining privacy and limited network traffic. Current tuple based approaches solve these issues partially but none of them solves all of them. We propose a novel tuple space-based approach where tuple spaces are annotated with tuple space descriptors used to determine the scope of a tuple. The novelty of our approach lies in the use of these tuple space descriptors to determine that a tuple should be propagated before it is transmitted. This enhances privacy and decreases the burden on the network traffic in a wide range of applications

    Reactive Context-Aware Programming

    Get PDF
    Using state of the art tools, context-aware applications are notified of relevant changes in their environment through event handlers which are triggered by dedicated middleware. The events signalled by the middleware should percolate through the entire application, requiring a carefully crafted network of observers combined with complex synchronization code to address the inherent concurrency issues. This paper proposes the adoption of reactive programming techniques to bridge the gap between the event-driven middleware and the application
    • …
    corecore